package org.raymond.iworks.study.basic.designpattern.prototype.improve;

/**
 * @author raymond
 * @version V1.0
 * @Description: TODO
 */
public class Client {
    public static void main(String[] args) {
        Sheep sheep1 = new Sheep("tom", 1, "white");
        Sheep sheep2 = (Sheep)sheep1.clone();
        // 克隆羊 ...

        System.out.println(sheep1);
        System.out.println(sheep2);

        sheep1.setName("tom1");
        System.out.println("修改sheep1的name为tom1");
        System.out.println(sheep1);
        System.out.println(sheep2);

        System.out.println(sheep1==sheep2);
        System.out.println(sheep1.equals(sheep2));
    }
}
